package algorithm.fft;

public class SparseDTF {
	public Complex[] fft(int[] v,int dim,Complex[] f){
		double kth; 
		for (int i=0; i<v.length; i++){
			int n=v[i]; 
			for (int k=0; k<dim; k++){
				kth = -2 *n*Math.PI/dim;
				f[k].re+=(float)Math.cos(kth);
				f[k].im+=(float)Math.sin(kth);   
			}
		}
		return f; 
	}
}
